package edu.algo3.algoThief.vista;

import edu.algo3.algoThief.util.Constants;

@SuppressWarnings("serial")
public class VentanaBanco
    extends javax.swing.JFrame {

    // Variables declaration - do not modify
    
    private VentanaCiudadActual ventanaCiudadActual;
    
    private javax.swing.JButton botonAtras;

    private javax.swing.JLabel jLabel1;

    private javax.swing.JScrollPane jScrollPane1;

    private javax.swing.JLabel labelBancoTitulo;

    private javax.swing.JTextPane textAreaPistaTestigoBanco;

    // End of variables declaration

    public VentanaBanco(VentanaCiudadActual ventanaCiudadActual,
                        String mensajePista) {

        initComponents();
        this.textAreaPistaTestigoBanco.setText(mensajePista);
        this.ventanaCiudadActual = ventanaCiudadActual;
    }

    private void botonAtrasActionPerformed(java.awt.event.ActionEvent evt) {
        this.setVisible(Boolean.FALSE);
        this.ventanaCiudadActual.actualizarHoraActual();
    }

    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        botonAtras = new javax.swing.JButton();
        labelBancoTitulo = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        textAreaPistaTestigoBanco = new javax.swing.JTextPane();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        botonAtras.setBackground(new java.awt.Color(139, 27, 27));
        botonAtras.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        botonAtras.setForeground(new java.awt.Color(255, 255, 255));
        botonAtras.setText(Constants.SALIR_DE_BANCO);
        botonAtras.addActionListener(new java.awt.event.ActionListener() {

            public void actionPerformed(java.awt.event.ActionEvent evt) {

                botonAtrasActionPerformed(evt);
            }
        });

        labelBancoTitulo.setFont(new java.awt.Font("Stencil", 0, 18)); // NOI18N
        labelBancoTitulo.setText(Constants.DESCRIPCION_EIDIFICIO_BANCO);

        jLabel1.setText("Testigo dice:");

        jScrollPane1.setViewportView(textAreaPistaTestigoBanco);

        javax.swing.GroupLayout layout =
            new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout
            .setHorizontalGroup(layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(
                    layout
                        .createSequentialGroup()
                        .addContainerGap()
                        .addGroup(
                            layout
                                .createParallelGroup(
                                    javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jScrollPane1)
                                .addGroup(
                                    layout
                                        .createSequentialGroup()
                                        .addGroup(
                                            layout
                                                .createParallelGroup(
                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(labelBancoTitulo)
                                                .addComponent(jLabel1))
                                        .addGap(0, 311, Short.MAX_VALUE))
                                .addGroup(
                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup()
                                        .addGap(0, 0, Short.MAX_VALUE)
                                        .addComponent(botonAtras)))
                        .addContainerGap()));
        layout
            .setVerticalGroup(layout.createParallelGroup(
                javax.swing.GroupLayout.Alignment.LEADING).addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(labelBancoTitulo,
                        javax.swing.GroupLayout.PREFERRED_SIZE, 19,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jLabel1)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE, 144,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(botonAtras)
                    .addContainerGap(45, Short.MAX_VALUE)));

        pack();
    }// </editor-fold>

}
